package com.dq.service.statistics;

import com.dq.controller.in.request.CustomerAnalysisQuery;
import com.dq.controller.in.request.DataCountRequest;
import com.dq.controller.in.request.StatisticsRequest;
import com.dq.domain.sys.user.user.BossUser;
import com.dq.exception.customException.AdminException;
import com.dq.controller.in.*;
import com.dq.vo.ListVo;
import com.dq.vo.Vo;
import com.dq.domain.org.Org;
import com.dq.domain.statistics.Statistics;
import com.dq.dto.*;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;

/**
 * @author liuhui
 * @date 2019/11/29 0029 16:56:26
 */
public interface StatisticsService {
    Long sumStatisticsNumByTime(StatisticsRequest statisticsRequest, Org org);


    Long sumLastStatisticsNumByTime(StatisticsRequest statisticsRequest, Org org);

    BigDecimal sumSalePrice(StatisticsRequest statisticsRequest);
    BigDecimal sumLastSalePrice(StatisticsRequest statisticsRequest);

    ListVo list(DataCountRequest dataCountRequest) throws AdminException;

    Long active(StatisticsRequest statisticsRequest);
    Long sum(StatisticsRequest statisticsRequest);

    Vo userOrderList(CustomerAnalysisQuery customerAnalysisQuery) throws AdminException;

    Long orgRanking(Long beginTime, Long endTime, Long orgId, Statistics.StatisticsType statisticsType);

    HashMap<String,Object> countCustomer(CountCustomerQuery countCustomerQuery);

    List<StaffManualPriceDto> countManualPrice(StaffManualPriceQuery query);

    StringBuilder getWhereSql(StaffManualPriceQuery queryy,StringBuilder sql);

    List<WagesStatisticeDto> countWages(StaffManualPriceQuery query);

    List<RewardStatisticeDto> countReward(StaffManualPriceQuery query);

    List<StaffStatisticeDto> countStaffRank(staffStatisticeQuery query);

    List<CustomerStatisticeDto> countCustomerStatistice(CustomerCountQuery customerCountQuery);

    List<ServiceProjectStatisticeDto> countServiceProject(ServiceProjectStatisticsQuery serviceProjectStatisticsQuery);


    List<IncomingStatisticsDto> countIncomingStatistics(IncomingStatisticsQuery incomingStatisticsQuery);




    List<SaleStatisticeDto> countSale(SaleStatisticsQuery saleStatisticsQuery, boolean isoOrg);

    List<AchievementStatisticsDto> achievementList(CountAchievementQuery countAchievementQuery);
    Long achievementCount(CountAchievementQuery countAchievementQuery);

    List<EvaluateDto> evaluateCount(EvaluateCountQuery evaluateCountQuery) throws AdminException;

    List<BossUser.FrontBossUser> listByEvaluate(Long orgId) throws AdminException;

    Vo subscribeCount(SubscribeCountQuery subscribeCountQuery)throws AdminException;

    List<ServiceProjectStatisticsDto> projectCount(ProjectStatisticsQuery projectStatisticsQuery) throws AdminException;
}
